package com.example.jack.community.persenter;

import android.content.Context;

import com.example.jack.community.R;
import com.example.jack.community.data.HomeCommentBean;
import com.example.jack.community.model.IHomeComment;

import java.util.ArrayList;

/**
 * Created by vveng on 2017/11/23 17: 34
 *
 * @mail: vvengStruggle@163.com
 * 首页动态详情评论实现类
 */

public class HomeCommentpersenter {
    private IHomeComment mIHomeComment;
    private Context mContext;
    private ArrayList<HomeCommentBean> mCommentBeen;

    public HomeCommentpersenter(IHomeComment IHomeComment, Context context) {
        mIHomeComment = IHomeComment;
        mContext = context;
    }
    //加载评论数据
    public void loadCommentData(){
        mCommentBeen = new ArrayList<>();
        String[] context = {"翁梓涛最帅","翁梓涛最帅","翁梓涛最帅","翁梓涛最帅","翁梓涛最帅","翁梓涛最帅","翁梓涛最帅","翁梓涛最帅","翁梓涛最帅","翁梓涛最帅"};
        String[] time = {"一分钟前","一分钟前","一分钟前","一分钟前","一分钟前","一分钟前","一分钟前","一分钟前","一分钟前","一分钟前"};
        for(int i=0;i<10;i++){
            HomeCommentBean bean = new HomeCommentBean();
            bean.setAvatarImage(R.drawable.tx);
            bean.setContext(context[i]);
            bean.setTime(time[i]);
            bean.setUsername("jack");
            mCommentBeen.add(bean);
        }
        mIHomeComment.loadCommentData(mCommentBeen);
    }
}
